package com.isoftstone.merchant.dao.role;

import com.isoftstone.common.Page;
import com.isoftstone.merchant.entity.role.PRole;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface PRoleMapper {
    PRole getRoleById(@Param("roleId") String roleId)throws Exception;

    PRole getRoleByCode(@Param("roleCode") String roleCode)throws Exception;

    List<PRole> getRolelistPage(Page page) throws Exception;

    List<PRole> getRole() throws Exception;

    public void saveRole(PRole pRole)throws Exception;

    public void updateRole(PRole pRole)throws Exception;

    /**批量删除
     * @param roleId
     * @throws Exception
     */
    public void deleteRole(Integer roleId)throws Exception;

    /**
     * @param comCode
     * @return
     * @throws Exception
     */
    List<PRole> getSysRole(@Param("comCode") String comCode) throws Exception;

    List<PRole> getCompanyRoles(@Param("empCode") String empCode, @Param("comCode") String comCode) throws Exception;
}